package com.huakang.controller;

import com.huakang.entity.Keshi;
import com.huakang.service.KeshiService;
import com.huakang.utils.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author{小熊}
 * @Date2025/1/13 14:56
 */
@RestController
@RequestMapping("/keshi")
public class KeshiController {
    @Autowired
    private KeshiService keshiService;

    @GetMapping("/getAll")
    public ResultVo getAll(){
        List<Keshi> list = keshiService.getAll();
        return ResultVo.success("查询成功",list);
    }

    @GetMapping("/keshiList")
    public ResultVo keshiList(){
        return ResultVo.success("查询成功",keshiService.keshiList());
    }
}
